<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@include file="common/common.jsp"%>

<%
	String path = request.getContextPath();
	String scanPath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+"/";
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	String docPath = scanPath + "/MrDoc/";
%>
<!DOCTYPE >
<html lang="en">
<head>
	<title>自助打印</title>
	<meta charset="utf-8">
	<meta http-equiv="x-ua-compatible" content="IE=10,9,8">
	<meta name="keywords" content="free, template, bootstrap, responsive">
	
	<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/bootstrap.css" type="text/css" media="screen">
	<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/bootstrap-select.css" type="text/css" >
	<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/responsive.css" type="text/css" media="screen">
	<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/style_.css" type="text/css" media="screen">
	<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/sdses.css" type="text/css" media="screen">
	<link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/touchTouch.css" type="text/css" media="screen">
	<link rel='stylesheet' href='${pageContext.request.contextPath}/static/css/googleapis.css'  type='text/css'>
	
	<link rel='stylesheet' href='${pageContext.request.contextPath}/static/css/toastr.min.css'  type='text/css'>
	
	<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/print/js/jquery.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/print/js/jquery.flexslider-min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/print/js/jquery.easing.1.3.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/print/js/jquery.cookie.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/print/js/bootstrap.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/print/js/bootstrap-select.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/print/js/touchTouch.jquery.js"></script>

	<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/print/sfz/numberkey.js"></script>
	<!-- 身份证号读卡器  -->
	<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/print/sfz/verifymessage.js"></script>
	<script language="javascript" src="${pageContext.request.contextPath}/static/js/print/LodopFuncs.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/print/sfz/progressbar.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/print/sfz/printLodop.js"></script> 
	<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/print/sfz/warn.js"></script>
	
	<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/print/toast/toastr.min.js"></script>
	<!-- 盖章机 -->
	<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/print/sfz/stampocx.js"></script>
	
	<script type="text/javascript">
		if($(window).width()>1024){document.write("<"+"script src='${pageContext.request.contextPath}/static/js/print/js/jquery.preloader.js'></"+"script>");}	
	</script>
	

	<script>
        jQuery(window).load(function() {
            $x = $(window).width();
            if($x > 1024)
            {
                jQuery("#content .row").preloader();    }

            jQuery('.magnifier').touchTouch();
            jQuery('.spinner').animate({'opacity':0},1000,'easeOutCubic',function (){jQuery(this).css('display','none')});
        });
	</script>

	<%-- <script type="text/javascript" src="${ss }/static/js/print/sockjs.min.js"></script>
	<script type="text/javascript" src="${ss }/static/js/print//stomp.js"></script>
	<script type="text/javascript" src="${ss }/static/js/print/socket.js"></script>
	<script type="text/javascript" src="${ss }/static/js/print/sfz/countdown.js"></script> --%>
	
	
	<style type="text/css">
		.toast-center-center {
           top: 50%;
           left: 50%;
           margin-top: -30px;
           margin-left: -150px;
		}
		.sfz_img{
			filter:alpha(opacity=65); 
		 	-moz-opacity:0.65; 
		 	-khtml-opacity: 0.65; 
		 	opacity: 0.65; 
		}
		
		.loadingNew{
			background: #000 url(<%=request.getContextPath()%>/static/images/loader_.gif) no-repeat 10px 50%;
		}
	</style>
	
</head>

<!-- onclick="updateTime()" -->
<body >
	<input type="hidden" id="printMachineIp">
	<input type="hidden" id="printerName">

	<!--start 背景图片  -->
	<img style="position:absolute;left:0px;top:0px;width:100%;height:100%;z-Index:-1; border:0px solid blue" src="${pageContext.request.contextPath}/static/images/zzdy.jpg" />
<div id="output" class="hide"></div>

<!-- start 身份证验证 -->
<div id="crdiv" class="modal_ modal" style="height:350px;">
	<div class="div_font1"><font class="font1" >自助打印机</font></div>
	<div class="div_font2"><font class="font2">请将身份证放置于读卡区</font></div>
	<div class="div_font3"><font class="font3"></font></div>
	<div class="div_font4"><input class="btn btn-large btn-block1" type="button" id="card_read" value="读取身份信息"></div>
</div>
<!-- end 身份证验证 -->

<div class="modal_tip" id="modal_tip">
		<table>
			<tr class="div_tip"><td height="50px" colspan="2" valign="top" style="font-weight: 900;font-size: 30px;">友情提示：</td></tr>
			<tr class="div_tip"><td valign="top" class="first_td">1.</td><td>将身份证放置于读卡区，点击“读取身份信息”按钮。</td>
			<tr class="div_tip"><td valign="top" class="first_td">2.</td><td>点击“发送验证码”按钮，系统将验证码发送至本人住院时留存的手机号码上。</td>
			<tr class="div_tip"><td valign="top" class="first_td">3.</td><td>通过验证后，选择所需病案用途及份数。</td>
			<tr class="div_tip"><td valign="top" class="first_td">4.</td><td>打印完成后，将打印病案放到装订处装订。</td>
		</table>
	</div>


<!--start 隐藏 -->
<input type="hidden" value="" id="choice">
<input type="hidden" id="link_phone" value="15665868859">
<input type="hidden" id="basepath" value="<%=basePath%>">
<input type="hidden" id="docPath" value="<%=docPath%>">
<input type="hidden" id="validationCode">
<input type="hidden" id="onlyId">
<input type="hidden" id="outpatient">
<input type="hidden" id="mobileNumber">
<input type="hidden" id="patientId">
<!-- end 隐藏 -->


<!--start 患者信息验证 -->
<div id="sfzdiv" class="modal_1 hide">
	<div class="div_sfz" style="position: relative;">
		<img  src="${pageContext.request.contextPath}/static/images/sfz.jpg" class="sfz_img" style="position: absolute; z-index: -1; right:15px;color: #01c;" />
		<table style="float:left">
			<tbody>
			<tr>
				<td style="width:100px;height:50px;"><font class="font4">姓名</font></td>
				<td style="width:100px;height:50px;" colspan='3'><span class="font9" id="span_name"></span></td>
				<td  rowspan='4' style="width:200px;height:170px;"><img  id="dispHead" class="sfz_img" src="" style="width: 131px; height: 158px; " name="dispHead"/></td>
			</tr>
			<tr>
				<td style="width:100px;height:30px;"><font class="font4">性别</font></td><td style="width:100px;height:30px;"><font class="font6" id="span_sex"></font></td>
				<td style="width:100px;height:30px;"><font class="font4">民族</font></td><td style="width:100px;height:30px;"><font class="font6" id="span_nation"></font></td>
			</tr>
			<tr><td style="width:100px;height:30px;"><font class="font4">出生</font></td><td colspan='3'><font class="font6" id="span_birthday"></font></td></tr>
			<tr><td style="width:100px;height:30px;"><font class="font4">住址</font></td><td colspan='3'><font class="font6" id="span_address"></font></td></tr>
			<tr><td colspan='2' style="height:40px;"><font class="font4">公民身份证号码</font></td><td colspan='3'><font class="font6" id="span_idcard"></font></td></tr>
			</tbody>
		</table>
	</div>
	
	<div id="div_validation">
		<div class="div_zyxx">
			<input type="hidden" disabled="disabled" placeholder="请输入病案号" id="dy_banum" name="banum">
		</div>
	
		<div class="div_zyxx">
			<font class="font7">验证码：</font>
			<input type="text" class="input-small" placeholder="输入验证码" id="dy_validation" name="validation" style="margin-bottom:15px!important">
			<input type="hidden" id="dy_phone" name="phone">
			<input type="button" class="btn btn-large btn-block2" id="send" style="width:170px;margin-bottom:15px!important" value="获取验证码" >
		</div>
		
		<div class="div_zyxx">
			<span class="font10">发至留存手机号：</span>
			<span class="font10" id="span_phone"></span>
		</div>
		<div class="div_button_1">
			<input class="btn-info btn btn_send" type="button" value="  返回主页面		"  onclick="window.location.reload();">
		</div>
	</div>
</div>
<!--end 患者信息验证 -->


<!-- start 输入框 -->
<div id="div_key" class="modal_key modal hide">
	<table class="table_key" >
		<tr>
			<td ><input type="button" class="btn  btn_key" id="key-7" value="7"></td>
			<td ><input type="button" class="btn btn_key" id="key-8" value="8"></td>
			<td ><input type="button" class="btn  btn_key" id="key-9" value="9"></td>
		</tr>
		<tr>
			<td ><input type="button" class="btn  btn_key" id="key-4" value="4"></td>
			<td ><input type="button" class="btn  btn_key" id="key-5" value="5"></td>
			<td ><input type="button" class="btn  btn_key" id="key-6" value="6"></td>
		</tr>
		<tr>
			<td ><input type="button" class="btn  btn_key" id="key-1" value="1"></td>
			<td ><input type="button" class="btn  btn_key" id="key-2" value="2"></td>
			<td ><input type="button" class="btn  btn_key" id="key-3" value="3"></td>
		</tr>
		<tr>
			<td ><input type="button" class="btn  btn_key" id="key-clear" value="清除"></td>
			<td ><input type="button" class="btn  btn_key" id="key-0" value="0"></td>
			<td ><input type="button" class="btn  btn_key" id="key-del" value="←"></td>
		</tr>
		<tr>
			<td colspan="3"><input type="button" class="btn btn_queren  btn_key" type="button" value="  确     认    " id="confirm_" ></td>
		</tr>
	</table>
</div>
<!-- end 输入框 -->

<!-- start 打印界面-->
<div id="myModal" class="modal  modal_dy hide">
	<div class="modal_top">

	</div>
	<div class="modal_banum">
		<table style="float:left; text-align: center;" class="table_group">
			<thead>
			<tr >
				<th style="width:60px;"></th>
				<th style="width:60px;">选择</th>
				<th style="width:95px;">病案号</th>
				<th style="width:95px;">住院次数</th>
				<th style="width:165px;text-align: center;">姓名</th>
				<th style="width:105px;">入院日期</th>
				<th style="width:105px;">出院日期</th>
				<th style="width:197px;">出院科室</th>
			</tr>
			</thead>
			<tbody id="table_banum">

			</tbody>
		</table>
	</div>
	
	<div class="modal_yt" style="display:none;">
		<font class="font7">病案用途：</font>
		<div class="combination" id="div_combination" style="margin-top: -23px;">
			<c:forEach items="${mrPrintTypeList}" var="comb" varStatus="vs">
				<div class="combination_left" id="checkbox_number_${comb.code }" onclick="click_check(this.id)" style="width: 230px;">
					<input id="number_checkbox_${comb.code }" value="${comb.code }" checked name="combination_checkbox" class="checkbox_" type="checkbox">
					<span class="font7" style="font-size: 16px; font-weight: bold; margin-left: 5px;">${comb.name }</span>
				</div>
			</c:forEach>
		</div>
	</div>

	<div class="modal_fs">
		<font class="font7">打印份数:</font>
		<input type="hidden" class="input-small input_fs" disabled="disabled"  id="input_fs" value="1">
	</div>
	
	<div class="modal_btn_fs_">
		
		<input type="button" class="btn btn_fs" id="fs_1" value="1" >
		<input type="button" class="btn btn_fs" id="fs_2" value="2" >
        <input type="button" class="btn btn_fs" id="fs_3" value="3" >
        <input type="button" class="btn btn_fs" id="fs_4" value="4" >
		<input type="button" class="btn btn_fs" id="fs_5" value="5" >
	</div>
	<input  value="0" id="dvdChoice" type="hidden">
	<!--
     <div class="modal_dvd_check">
         <font class="font7">是否刻录：</font>

     </div>
     <div class="modal_btn_dvd_">
         <input  value="0" id="dvdChoice" class="checkbox_" type="checkbox" name="dvdCheck" onclick="click_dvd()">
     </div> -->

   <%-- <div class="div_font4">
		<input class="btn btn-large btn-block2" type="button" value="支付宝支付" id="printCost_1">
		<input class="btn btn-large btn-block2" type="button" value="微信支付" id="printCost_2">
		&lt;%&ndash;<input class="btn btn-large btn-block2" type="button" value="打印" onclick="myPrint()" id="print">
        <input class="btn btn-large btn-block2" type="button" value="微信支付" onclick="create()" id="print">
        <input class="btn btn-large btn-blockdy" type="button" value="打印" onclick="testPrint()" id="print" >
        <input class="btn btn-large btn-block2" type="button" value="发行光盘" id="issueDvd" >&ndash;%&gt;
    </div>--%>
	<div id="progress_bar" class="div_progressbar"></div>
</div>
<!-- end 打印界面-->

<!-- start 支付界面-->
<div id="paymentModal" class="payscan hidden">
	<div class="modal_top_payscan">
		打印费用：<font class="font19" id="hdfy"></font>元<br>
		<input type="hidden"   id="printPageTotal">
		<input type="hidden" id="printTotalFee">
	</div>

	<div id="pay_balance">
		<div style=" text-align: center;">
			<input type="button" id="btn_balance" class="btn-info btn btn_pay"	value="确认">
			<input type="button" id="btn_close_1" class="btn-info btn btn_pay" value="取消"></div>
		<div class="modal_buttom_payscan">
			请按确认，继续打印。<br/>
		</div>
	</div>
	<div id="pay_type" class="hidden">
		<div class="pay_modal_scan hidden" id="pay_qr">
			<div id="alipay_loading" class="loading">正在生成二维码...</div>
		</div>

		<div style=" text-align: center;">
			<input type="button" class="btn-info btn btn_pay" id="pay_1"	value="银联">
			<input type="button" id="btn_close_2" class="btn-info btn btn_pay" value="取消">
		</div>
		<div class="modal_buttom_payscan hiden">
			支付成功，请等候1分钟左右开始打印！
		</div>
	</div>
</div>

<div class="spinner"></div>

<!-- Lodop 打印机 -->
<object  id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0> 
       <embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0></embed>
</object>


<!-- start 身份证读卡器-->
<input type="hidden" id="partyName" value="陈勇">
<input type="hidden" id="gender" ><!-- (取值为“1”（表示“男”）或“0”（表示“女”）) -->
<input type="hidden" id="nation" >
<input type="hidden" id="bornDay" >
<input type="hidden" id="certAddress" >
<input type="hidden" id="certNumber" value="370123198706200013">
<input type="hidden" id="certOrg">
<input type="hidden" id="effDate">
<input type="hidden" id="expDate">
<input type="hidden" id="result">
<input type="hidden" id="headBase64DataLen">
<input type="hidden" id="finPath1">
<input type="hidden" id="finPath2" >
<input id="headBase64Data" type="hidden">
<input type="hidden" id="timeElapsed" >
<input type="hidden" id="samID">
<input type="hidden" id="headPath" >
<input type="hidden" id="hasFinger" >
<input type="hidden" id="operationId">
<input type="hidden" id="outTradeCode">

<!-- 神思身份证读卡器 -->
<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/print/sfz/shensi.js"></script>

<OBJECT
	  classid="clsid:F1317711-6BDE-4658-ABAA-39E31D3704D3"
	  codebase="SDRdCard.cab#version=1,0,0,0"	  
	  width=0
	  height=0
	  align=center
	  hspace=0
	  vspace=0
	  id=idcard
	  name=rdcard	
>
</OBJECT>

<!-- 盖章机 -->
<object id="stampocx" width="0" height="0" classid="clsid:B171AE51-CB83-4049-93AE-D1100E1104BE"></object>

<!--打印机状态获取-->
<object id="ptrocx" width="0" height="0" classid="clsid:52E098EE-805E-4E26-8E0E-33DABD1DF7FA"></object>

<script for=idcard event="Readed()">
	  console.log("--回调时间准备读取身份证号信息--");
      getinfo_onclick();
</script>

<script for=idcard event="Closed()">
      //window.close();
</script>

<script for=idcard event="Opened()">
      //window.close();
</script>

 <script type="text/javascript">
        toastr.options.positionClass = 'toast-center-center';
        toastr.options.timeOut = 6000;
 </script>

<div class="button_close hide" onclick="window.location.reload();" id="fq_dy" style="margin-bottom: 150px;">
	<input type="button" class="btn-info btn btn_send" value="放弃病案打印" style="margin-bottom: 150px;z-index:999999">
</div>


</body>



</html>
